{extend name="base" /} {block name="body"}
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="/public/oem/css/iconfont.css" />
	<link rel="stylesheet" href="/public/oem/css/css.css" />
	<link rel="stylesheet" href="/public/static/layui/css/layui.css" media="all">
</head>

<div class="layui-body">
	<div class="navbar">
		<a><cite>广告管理</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>分享设置</cite></a>
	</div>
	<div class="layui-tab layui-tab-card margin10">
		<ul class="layui-tab-title">
			<li class="layui-this">分享参数</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form form-container layui-form-pane" action="{:url()}" method="post">
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">产品中心分享标题</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_cpzx]" value="{$share_config.share_cpzx}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">产品中心分享内容</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_cpzx_content]" value="{$share_config.share_cpzx_content}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">产品中心广告图片</label>
					<div class="layui-input-block" style="padding-left: 10px;">
						<div class="layui-upload">
							<button type="button" class="layui-btn" id="image">上传图片</button>
							<div class="layui-upload-list">
								<img class="layui-upload-img" src="{$share_config.cpthumb}" name="share_config[cpthumb]" style="width: 150px;height: 150px;" id="demo1">
								<p id="demoText"></p>
							</div>
						</div>
					</div>
					<input type="hidden" name="share_config[cpthumb]" id="thumb1" value="{$share_config.cpthumb}"/>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">设交会所分享标题</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_sjhs]" value="{$share_config.share_sjhs}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">设交会所分享内容</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_sjhs_content]" value="{$share_config.share_sjhs_content}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">设交会所广告图片</label>
					<div class="layui-input-block" style="padding-left: 10px;">
						<div class="layui-upload">
							<button type="button" class="layui-btn" id="image1">上传图片</button>
							<div class="layui-upload-list">
								<img class="layui-upload-img" src="{$share_config.hsthumb}" name="share_config[hsthumb]" style="width: 150px;height: 150px;" id="demo2">
								<p id="demoText"></p>
							</div>
						</div>
					</div>
					<input type="hidden" name="share_config[hsthumb]" id="thumb2" value="{$share_config.hsthumb}"/>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">会员服务分享标题</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_hyfw]" value="{$share_config.share_hyfw}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">会员服务分享内容</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_hyfw_content]" value="{$share_config.share_hyfw_content}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">会员服务广告图片</label>
					<div class="layui-input-block" style="padding-left: 10px;">
						<div class="layui-upload">
							<button type="button" class="layui-btn" id="image2">上传图片</button>
							<div class="layui-upload-list">
								<img class="layui-upload-img" src="{$share_config.hythumb}" name="share_config[hythumb]" style="width: 150px;height: 150px;" id="demo3">
								<p id="demoText"></p>
							</div>
						</div>
					</div>
					<input type="hidden" name="share_config[hythumb]" id="thumb3" value="{$share_config.hythumb}"/>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">商品详情分享标题</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_spxq]" value="{$share_config.share_spxq}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">商品详情分享内容</label>
					<div class="layui-input-block">
						<input type="text" style="width: 650px" name="share_config[share_spxq_content]" value="{$share_config.share_spxq_content}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 150px">商品详情广告图片</label>
					<div class="layui-input-block" style="padding-left: 10px;">
						<div class="layui-upload">
							<button type="button" class="layui-btn" id="image3">上传图片</button>
							<div class="layui-upload-list">
								<img class="layui-upload-img" src="{$share_config.spthumb}" name="share_config[spthumb]" style="width: 150px;height: 150px;" id="demo4">
								<p id="demoText"></p>
							</div>
						</div>
					</div>
					<input type="hidden" name="share_config[spthumb]" id="thumb4" value="{$share_config.spthumb}"/>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="*"><i class="fa fa-save"></i> 保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
{/block}
{block name="js"}
<script src="/public/static/layui/layui.js"></script>
<script type="text/javascript" src="/public/static/js/image.zip.js"></script>
<script type="text/javascript" src="/public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/public/ueditor/ueditor.all.js"></script>

<script>
	var ue = UE.getEditor('content', {
        initialFrameHeight: 450,
		serverUrl: "{:url('admin/ueditor/index?cate=news')}"
	});
	var GV = {
		current_controller: "advertise/sharesz"
	};
		layui.use('upload', function() {
		var upload = layui.upload,
		jq = layui.jquery;
		upload.render({
			url: '{:url("upload")}',
			elem: '#image',
			ext: 'jpg|png|gif',
			area: ['500', '500px'],
			before: function(input) {
				
			},
			done: function(res) {
				if(res.code==1){
					$("#demo1").attr('src',res.src);
					$("#thumb1").val(res.src);
				}
			}
		});
	})
		
		layui.use('upload', function() {
		var upload = layui.upload,
		jq = layui.jquery;
		upload.render({
			url: '{:url("upload")}',
			elem: '#image1',
			ext: 'jpg|png|gif',
			area: ['500', '500px'],
			before: function(input) {
				
			},
			done: function(res) {
				if(res.code==1){
					$("#demo2").attr('src',res.src);
					$("#thumb2").val(res.src);
				}
			}
		});
	})
		
		layui.use('upload', function() {
		var upload = layui.upload,
		jq = layui.jquery;
		upload.render({
			url: '{:url("upload")}',
			elem: '#image2',
			ext: 'jpg|png|gif',
			area: ['500', '500px'],
			before: function(input) {
				
			},
			done: function(res) {
				if(res.code==1){
					$("#demo3").attr('src',res.src);
					$("#thumb3").val(res.src);
				}
			}
		});
	})
		
		layui.use('upload', function() {
		var upload = layui.upload,
		jq = layui.jquery;
		upload.render({
			url: '{:url("upload")}',
			elem: '#image3',
			ext: 'jpg|png|gif',
			area: ['500', '500px'],
			before: function(input) {
				
			},
			done: function(res) {
				if(res.code==1){
					$("#demo4").attr('src',res.src);
					$("#thumb4").val(res.src);
				}
			}
		});
	})

</script>
{/block}